//
//  RootViewController.m
//  Social_Fitness
//
//  Created by Macintosh User on 10/23/09.
//  Copyright __MyCompanyName__ 2009. All rights reserved.
//

#import "RootViewController.h"
#import "MyGroupViewController.h"
#import "MyExerciseNavigationController.h"
#import "MyStatsNavigationController.h"

@implementation RootViewController
@synthesize	button1, button2, button3;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
	if (!(self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]))
        return nil;
	
    self.title = NSLocalizedString(@"My Group", @"");
	
	return self;
}

- (void)viewDidLoad
{
}

- (IBAction)ButtonPressedGroup:(id)sender{
	UIViewController *targetViewController;
	targetViewController = [[MyGroupViewController alloc] initWithNibName:@"MyGroupViewController" bundle:nil];
	[self.navigationController pushViewController:targetViewController animated:YES];
	[targetViewController release];
}

- (IBAction)ButtonPressedExercise:(id)sender{
	UIViewController *targetViewController;
	targetViewController = [[MyExerciseNavigationController alloc] initWithNibName:@"MyExerciseNavigationController" bundle:nil];
	[self.navigationController pushViewController:targetViewController animated:YES];
	[targetViewController release];
}

- (IBAction)ButtonPressedStats:(id)sender{
	UIViewController *targetViewController;
	targetViewController = [[MyStatsNavigationController alloc] initWithNibName:@"MyStatsNavigationController" bundle:nil];
	[self.navigationController pushViewController:targetViewController animated:YES];
	[targetViewController release];
}

- (void)dealloc
{
	[button1 release];
	[button2 release];
	[button3 release];
	[super dealloc];
}


@end